<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<link rel="stylesheet" href="../../public/easyui/themes/default/easyui.css" />
<link rel="stylesheet" href="../../public/easyui/themes/icon.css" />
<script src="../../public/js/jquery.min.js"></script>
<script src="../../public/easyui/jquery.easyui.min.js"></script>
<script src="../../public/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="../../public/css/front_program.css" />
<link rel="stylesheet" href="../../public/css/front_head.css" />
<title>项目内容</title>
<script language="javascript" type="text/javascript"> 
$(function() {
	var interval = 1000; 
	
	function ShowCountDown(year,month,day,divname) { 
		
		var now = new Date(); 
		var endDate = new Date(year, month-1, day); 
		var leftTime=endDate.getTime()-now.getTime(); 
		var leftsecond = parseInt(leftTime/1000); 
		var day1=Math.floor(leftsecond/(60*60*24)); 
		var hour=Math.floor((leftsecond-day1*24*60*60)/3600); 
		var minute=Math.floor((leftsecond-day1*24*60*60-hour*3600)/60); 
		var second=Math.floor(leftsecond-day1*24*60*60-hour*3600-minute*60); 
		var cc = document.getElementById(divname); 
		cc.innerHTML = day1+"天"+hour+"小时"+minute+"分"+second+"秒"; 
	} 
	
	var end=document.getElementById("endTime").value;
	var str = end.split('-');
	var y=str[0];
	var m=str[1];
	var d=str[2];
	window.setInterval(function(){ShowCountDown(y,m,d,'timer');}, interval); 
	
});
</script>  

<style>	 
	 .one{	
	 	width:90%;
	 	margin:5px;
	 	border-radius:3px;
	 	margin-top:20px;
	 	margin-left:20px;
	 	
	 }
	 table{
	 	border-collapse:collapse; 
	 	color:grey;
	 	border-left:none;
	 	border-right:none;
	 	width:100%;	 	
	 }
	table tr{
		border-bottom: dashed 1px #ccc;
	}
	 table div{
	 	width:50px;
	 	height:22px;
	 	border-radius:5px;
	 	color:white;
	 	background-color:#23B7E5;
	 	font-size:12px;
	 	text-align:center;
	 	line-height:22px;
	 	
	 }
</style>
<body style="background-image: url(../../public/images/bg_text.png); background-repeat: no-repeat;">
<jsp:include page="header.jsp"></jsp:include>
<div class="tab1">所有项目</div>
<div class="tab1_line" style="width:92%"></div>
<div class="one">
	
	<table cellpadding="20" >
		<c:forEach items="${leaderNo}" var="leaderNo">
			<tr>
				<td><div>${leaderNo.status}</div></td>
				<td><span style="font-size:14px;font-weight:bold">${leaderNo.title }</span><br/><br/>
				<span style="font-size:12px;">创建于：${leaderNo.ptime}</span>
				</td>				
				<td>倒计时：<input type="hidden"  value="${leaderNo.end_time}" id="endTime">
					<span id="timer"></span>
				</td>
				<td value="${members }">成员：
						<c:forEach items="${members}" var="members">
								${members.student.name}&nbsp;
						</c:forEach>
				</td>
			</tr>
		</c:forEach>
		
		<c:forEach items="${leader}" var="leader">
			<tr>
				<td><div>${leader.status}</div></td>
				<td><span style="font-size:14px;font-weight:bold">${leader.title }</span><br/><br/>
				<span style="font-size:12px;">创建于：${leader.ptime}</span>
				</td>				
				<td>结束时间：${leader.end_time}</td>
				<td>成员：
						<c:forEach items="${member}" var="member">
								${member.student.name}&nbsp;
						</c:forEach>
				</td>
			</tr>	
		</c:forEach>
	</table>
</div>
</body>